package tasktracker.core.abstraction;

import java.util.Date;
import java.util.List;

import tasktracker.abstraction.TaskProgressInfo;

public interface TaskStoreProvider {

	void addTask(FrameworkTrackedTask task);
	FrameworkTrackedTask getTask(String guid);
	void removeTask(String guid);
	void updateStartTime(String guid, Date currentDatetimeUtc);

	List<FrameworkTrackedTask> getTasksByStatus(int status);
	void updateStatus(String guid, int status);
	void updateStatus(List<String> guids, int status);
	boolean checkAndUpdateStatus(String guid, int status, int oldStatus);
	void checkAndUpdateStatus(List<String> guids, int status, int oldStatus);

	void setResult(String guid, int status, Date currentDatetimeUtc, String primaryResult, String secondaryResult);
	void setResult(List<String> guids, int status, Date currentDatetimeUtc, String primaryResult,
			String secondaryResult);

	void storeProgress(String guid, TaskProgressInfo progress);
	void removeProgress(String guid);
}
